package com.neusoft.neumooc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.BaseService;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.dao.ParamDAO;
import com.neusoft.neumooc.vo.ParamVO;

@Service
@Transactional
public class ParamServiceImpl extends BaseService implements ParamService {

    @Autowired
    private ParamDAO paramDAO;
    
    @Override
    public List<ParamVO> getAllParams() throws ServiceException {
        try {
            return paramDAO.getAllParams();
        } catch (Exception e) {
            log.error("获取参数列表失败", e);
            throw new ServiceException("获取参数列表失败", e);
        }
    }

    @Override
    public boolean updateParams(List<ParamVO> params) throws ServiceException {
        try {
            return paramDAO.updateParams(params);
        } catch (Exception e) {
            log.error("更新参数失败", e);
            throw new ServiceException("更新参数失败", e);
        }
    }
} 